package com.design.util.moveBox;
import com.design.config.GameFile;

import java.io.File;
public class MapMethod {
    private final Box[][] map;
    private File file;
    private final int playerX;
    private final int playerY;
    private File logMap;
    public MapMethod(Box[][] map,File file,int playerX,int playerY){
        if(file != null) {
            String name = file.getName();
            String path = GameFile.MAP_LOG_DIR + name;
            this.logMap = new File(path);
        }
        this.map = map;
        this.file = file;
        this.playerX = playerX;
        this.playerY = playerY;
    }
    public File getLogMap() {
        return logMap;
    }
    public void setFile(File file){
        this.file = file;
    }
    public int size(){
        return this.map.length;
    }
    public MapMethod(Box[][] map,int playerX,int playerY){
        this(map,null,playerX,playerY);
    }
    public Box[][] getMap() {
        return map;
    }
    public File getFile() {
        return file;
    }
    public int getPlayerY() {
        return playerY;
    }
    public int getPlayerX() {
        return playerX;
    }
}
